Automatic therapy adjustments

ABSTRACT

A medical device detects a previously defined event, and controls delivery of therapy to a patient according to therapy information associated with the previously defined event. In exemplary embodiments, the medical device enters a learning mode in response to a command received from a user, e.g., the patient or a clinician. In such embodiments, the medical device defines the event, collects the therapy information, and associates the therapy information with the defined event while operating in the learning mode. In some embodiments, the medical device defines the event based on the output of a sensor that indicates a physiological parameter of the patient during the learning mode. The sensor may be an accelerometer, which generates an output that reflects motion and/or posture of the patient. The medical device may collect therapy information by recording therapy changes made by the user during the learning mode.

This application claims priority from U.S. Provisional Application Ser.No. 60/503,218, filed Sep. 15, 2003, the entire content of which isincorporated herein by reference.

TECHNICAL FIELD

The invention relates to medical devices, and more particularly, tomedical devices used for chronic therapy provision.

BACKGROUND

A variety of types of medical devices are used for chronic, e.g.,long-term, provision of therapy to patients. As examples, pulsegenerators are used for chronic provision of cardiac pacing andneurostimulation therapies, and pumps are used for chronic delivery oftherapeutic agents, such a drugs. Typically, such devices providetherapy continuously or periodically according to parameters, e.g., aprogram, specified by a clinician.

In some cases, the patient is allowed to activate and/or modify thetherapy. For example, the symptoms, e.g., the intensity of pain, ofpatients who receive spinal cord stimulation (SCS) therapy may vary overtime based on the activity level or posture of the patient, the specificactivity undertaken by the patient, or the like. For this reason, apatient who receives SCS therapy from an implantable medical device(IMD), e.g., an implantable pulse generator, is often given a patientprogramming device that communicates with his IMD via device telemetry,and allows the patient to activate and/or adjust the intensity of thedelivered neurostimulation.

SUMMARY

In general, the invention is directed to techniques for providingautomatic adjustments to a therapy. A medical device, such as animplanted medical device (IMD) for delivering a therapy or a programmingdevice, automatically adjusts delivery of the therapy in response todetecting a previously defined event. By automatically adjusting therapyin response to detecting a previously defined event, the medical devicecan automatically provide appropriate therapy to address changes in thesymptoms of a patient, and/or changes in the efficacy or side effects ofthe therapy associated with the event. The medical device may deliverneurostimulation therapy, and an event may be an activity and/or postureundertaken by the patient, such as running or sitting in a chair, whichwill likely impact the type or level of symptoms and/or the paresthesiaexperienced by the patient.

In exemplary embodiments, the medical device enters a learning mode inresponse to a command received from a user, e.g., the patient. In suchembodiments, the medical device defines the event, collects the therapyinformation, and associates the therapy information with the definedevent while operating in the learning mode. In some embodiments, themedical device defines the event based on an indication of the eventreceived from the user. In other embodiments, the medical device definesthe event based on the output of a sensor that indicates the activity,posture, or a physiological parameter of the patient during the learningmode. The sensor may be an accelerometer, which generates an output thatreflects motion and/or posture of the patient. The medical device maycollect therapy information by recording values of one or more therapyparameters, such as pulse amplitude, width and rate, and/or changes madeto the parameters by the user during the learning mode.

When a patient undertakes certain activities and/or postures, thepatient may experience an uncomfortable increase in the intensity of theneurostimulation delivered by a medical device. This phenomenon isreferred to as a “jolt.” Some of the events detected by the medicaldevice may correspond to a jolt. In response to detecting these events,the medical device may suspend delivery of neurostimulation therapy fora period of time, which may advantageously allow the medical deviceavoid providing uncomfortable stimulation to the patient.

In one embodiment, the invention is directed to a method in which acommand to enter a learning mode is received from a user. An event isdefined, and therapy information is associated with the defined event,in response to the command. The defined event is subsequently detected,and therapy is provided to a patient via a medical device according tothe therapy information in response to the detection.

In another embodiment, the invention is directed to a medical devicethat comprises a memory and a processor. The processor receives acommand to enter a learning mode from a user, and defines an event andassociates therapy information with the defined event within the memoryin response to the command. The processor subsequently detects theevent, and controls delivery of therapy to a patient according to thetherapy information in response to the detection.

In another embodiment, the invention is directed to a computer-readablemedium containing instructions. The instructions cause a programmableprocessor to receive a command from a user to enter a learning mode, anddefine and event and associate therapy information with the definedevent in response to the command. The computer-readable medium furthercomprises instructions that cause a programmable processor tosubsequently detect the defined event, and control delivery of therapyto a patient via a medical device according to the therapy informationin response to the detection.

The invention may provide advantages. For example, by automaticallyadjusting therapy in response to a detected event, a medical device canprovide therapy that better addresses changes in the symptoms of apatient and/or level of efficacy or side effects of the therapyassociated with an activity undertaken by the patient. The medicaldevice may automatically provide the appropriate therapy for frequentlyoccurring events, e.g., activities that the patient frequentlyundertakes, allowing the patient to avoid having to manually adjust thetherapy each time the event occurs. Manual adjustment of stimulationparameters can be tedious, requiring the patient to, for example,depress one or more keys of a keypad of a patient programmer multipletimes during the event to maintain adequate symptom control. Instead,according to the invention, the patient may perform such adjustments asingle time during a learning mode, and the medical device mayautomatically provide the adjustments during subsequent occurrences ofthe event.

The details of one or more embodiments of the invention are set forth inthe accompanying drawings and the description below. Other features,objects, and advantages of the invention will be apparent from thedescription and drawings, and from the claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a conceptual diagram illustrating an exemplary system thatfacilitates automatic discrete therapy adjustment according to theinvention.

FIG. 2 is a block diagram illustrating an example medical device thatprovides therapy and automatically makes discrete adjustments to thetherapy.

FIG. 3 is a block diagram illustrating an exemplary configuration of amemory of the medical device of FIG. 2.

FIG. 4 is a block diagram illustrating an example programming devicethat allows a user to communicate with the medical device of FIG. 2.

FIG. 5 is a flow diagram illustrating an exemplary operation of themedical device of FIG. 2 according to a learning mode.

FIG. 6 is a flow diagram illustrating another exemplary operation of themedical device of FIG. 2 according to a learning mode.

FIG. 7 is a flow diagram illustrating an exemplary operation of themedical device of FIG. 2 to provide discrete therapy adjustmentsaccording to the invention.

FIG. 8 is a timing diagram illustrating display of diagnosticinformation including learned events according to the invention.

DETAILED DESCRIPTION

FIG. 1 is a conceptual diagram illustrating an exemplary system 10 thatfacilitates automatic therapy adjustment according to the invention. Inthe illustrated example, system 10 includes an implantable medicaldevice (IMD) 12, which is implanted within a patient 14, and deliversneurostimulation therapy to patient 14. In exemplary embodiments, IMD 12takes the form of an implantable pulse generator, and deliversneurostimulation therapy to patient 14 in the form of electrical pulses.

IMD 12 delivers neurostimulation therapy to patient 14 via leads 16A and16B (collectively “leads 16”). Leads 16 may, as shown in FIG. 1, beimplanted proximate to the spinal cord 18 of patient 14, and IMD 12 maydeliver spinal cord stimulation (SCS) therapy to patient 14 in order to,for example, reduce pain experienced by patient 14. However, theinvention is not limited to the configuration of leads 16 shown in FIG.1 or the delivery of SCS therapy. For example, one or more leads 16 mayextend from IMD 12 to the brain (not shown) of patient 14, and IMD 12may deliver deep brain stimulation (DBS) therapy to patient 14 to, forexample, treat tremor or epilepsy. As further examples, one or moreleads 16 may be implanted proximate to the pelvic nerves (not shown) orstomach (not shown), and IMD 12 may deliver neurostimulation therapy totreat incontinence or gastroparesis.

In exemplary embodiments, IMD 12 delivers therapy to patient 14according to a program. A program includes one or more parameters thatdefine an aspect of the therapy delivered by the medical deviceaccording to that program. For example, a program that controls deliveryof neurostimulation by IMD 12 may define a voltage or current pulseamplitude, a pulse width, a pulse rate, for stimulation pulses deliveredby IMD 12 according to that program. Further, each of leads 16 includeselectrodes (not shown in FIG. 1), and the parameters for a program thatcontrols delivery of neurostimulation therapy by IMD 12 may includeinformation identifying which electrodes have been selected for deliveryof pulses according to the program, and the polarities of the selectedelectrodes.

In the illustrated example, system 10 also includes a programming device20, which is a medical device, and may, as shown in FIG. 1, be ahandheld computing device. Programming device 20 allows a user tointeract with IMD 12. Programming device 20 may, for example,communicate via wireless communication with IMD 12 using RF telemetrytechniques known in the art.

Programming device 20 may, as shown in FIG. 1, include a display 22 anda keypad 24 to allow the user to interact with programming device 20. Insome embodiments, display 22 may be a touch screen display, and the usermay interact with programming device 20 via display 22. The user mayalso interact with programming device 20 using peripheral pointingdevices, such as a stylus or mouse. Keypad 24 may take the form of analphanumeric keypad or a reduced set of keys associated with particularfunctions.

In exemplary embodiments, programming device 20 is a patient programmerused by patient 14 to control the delivery of neurostimulation therapyby IMD 12. Patient 14 may use programming device 20 to activate ordeactivate neurostimulation therapy. Patient 14 may also use programmingdevice 20 to adjust one or more program parameters, e.g., adjust theamplitude, width, or rate of delivered stimulation pulse. Where morethan one program is available to IMD 12 for delivery of neurostimulationto patient 14, patient 14 may use programming device 20 to select fromamong the available programs. The programs available for selection bypatient 14 may be stored in either of IMD 12 and programming device 20.

As will be described in greater detail below, one or both of IMD 12 andprogramming device 20 provide automatic adjustment of the therapydelivered by IMD 12 according to the invention. Specifically, one of IMD12 and programming device 20 detects a previously defined event, and thedelivery of therapy by IMD 12 is automatically adjusted according totherapy information stored in association with defined event. Inexemplary embodiments, the one of IMD 12 and programming device 20 maymake automatic adjustments to the therapy over a period of time inresponse to detection of the previously defined event, e.g., provide aseries of therapy adjustments defined by the therapy informationassociated with the event. By automatically adjusting therapy inresponse to a detected event, system 10 can provide therapy that betteraddresses changes in the symptoms of patient 14 associated with theevent.

For ease of description, the provision of automatic therapy adjustmentwill be described hereinafter primarily with reference to embodiments inwhich IMD 12 provides automatic therapy adjustments. However, it isunderstood that both of IMD 12 and programming device 20 are medicaldevices capable of providing automatic therapy adjustments according tothe invention.

In exemplary embodiments, IMD 12 provides a learning mode. IMD 12 mayenter the learning mode in response to a command received from a user.For example, patient 14 may direct IMD 12 to enter the learning mode viakeypad 24 of patient programmer 20.

When operating in the learning mode, IMD 12 defines events andassociates therapy information with the events. In some embodiments, IMD12 defines the event based on the indication of the event to IMD 12 by auser. In such embodiments, IMD 12 later detects the event by receivingthe indication from the user, and automatically adjusts therapyaccording to information stored in association with that indication,e.g., with the event.

For example, patient 14 may indicate the occurrence of an event to IMD12 via keypad 24 of patient programmer 20. In some embodiments, aparticular key of keypad 24 is associated with the event. The event maycorrespond to an activity undertaken by patient 14, such as running,golfing, taking medication, sleeping, or a particular activity relatedto an occupation of patient 14. A first time patient 14 undertakes theactivity, the activity, e.g., event, may be associated with a key ofkeypad 24. Subsequent times patient 14 undertakes the activity, patient14 may press the key to cause IMD 12 to provide therapy adjustmentaccording to therapy information associated with depression of the key.

In other embodiments, IMD 12 defines the event based on the output of asensor (not shown in FIG. 1). IMD 12 may monitor the sensor output inresponse to the command to enter the learning mode received from theuser, e.g., patient 14. After the event is defined, IMD 12 may monitorthe output of the sensor, and, if the event is subsequently detected,provide automatic therapy adjustment according to information stored inassociation with the event. For example, IMD 12 may record the sensoroutput for a period during the learning mode to define the event, and,when no longer operating in the learning mode, apply digital signaland/or pattern recognition analysis techniques to the sensor output toautomatically identify subsequent occurrences of the event based oncomparison to the recorded exemplar.

The output of the sensor may reflect motion, posture, and/or one or morephysiological parameters of patient 14. Consequently, events defined byIMD 12 based on the sensor output may correspond to an activityundertaken by patient 14. For example, patient 14 may direct IMD 12 toenter the learning mode via patient programmer 20 when patient 14 isabout to undertake an activity, such as running. IMD 12 may record theoutput of the sensor in response to the command, and, when no longer inthe learning mode, use the recorded exemplar to detect when patient 14is running so as to automatically provide an appropriate therapyadjustment according to therapy information stored in association withthe exemplar.

IMD 12 may associate therapy information with the defined event whileoperating in the learning mode, and provide therapy, e.g., automaticallyadjusts the therapy, according to the therapy information in response tosubsequent detection of the defined event. The therapy information maybe the values of one or more parameters, e.g., pulse amplitude, pulsewidth, or pulse rate, recorded by IMD 12 upon entering, or at some pointafter entering, the learning mode. The therapy information may be achange to a parameter made by a user while IMD 12 is operating in thelearning mode. In exemplary embodiments, IMD 12 records a series ofchanges made to parameters by the user over a period of time while IMD12 is operating in the learning mode.

For example, patient 14 may direct IMD 12 to enter the learning mode sothat IMD 12 will learn the appropriate adjustment or adjustments to maketo the stimulation parameters while patient 14 is running. Patient 14may indicate the occurrence of the event to IMD 12, e.g., may associatea key of keypad 24 with the activity of running, or may simply beginrunning and allow IMD 12 to record an exemplar of the sensor outputwhile patient 14 is running. In any case, while patient 14 is runningduring the learning mode, patient 14 uses programming device 20, e.g.,keypad 24, to change one or more stimulation parameters in an attempt tomaintain adequate symptom control during the activity. IMD 12 may recordthe value of the parameters when patient 14 indicates satisfaction, orthe one or more changes made by patient 14 over a period of time whilerunning. IMD 12 stores the values or a recording of the changes over thetime period in association with the event, and, when no longer operatingin the learning mode, delivers therapy according to the therapyinformation upon subsequently detecting that patient 14 is running.

By associating therapy information with defined events, IMD 12 mayautomatically provide appropriate therapy to patient 14 for frequentlyoccurring events, e.g., activities that patient 14 frequentlyundertakes. By providing therapy adjustments automatically, IMD 12 mayallow patient 14 to avoid having to manually adjust the therapy eachtime the event occurs. Such manual adjustment of stimulation parameterscan be tedious, requiring patient 14 to, for example, depress one ormore keys of keypad 24 multiple times during the event to maintainadequate symptom control. Instead, according to the invention, patient14 may perform such adjustments a single time during the learning mode,and IMD 12 may automatically provide the adjustments during subsequentoccurrences of the event.

FIG. 2 is a block diagram illustrating IMD 12 in greater detail. IMD 12may deliver neurostimulation therapy via electrodes 30A-D of lead 16Aand electrodes 30E-H of lead 16B (collectively “electrodes 30”).Electrodes 30 may be ring electrodes. The configuration, type and numberof electrodes 30 illustrated in FIG. 2 are merely exemplary.

Electrodes 30 are electrically coupled to a therapy delivery circuit 32via leads 16. Therapy delivery circuit 32 may, for example, include anoutput pulse generator coupled to a power source such as a battery.Therapy delivery circuit 32 may deliver electrical pulses to patient 14via at least some of electrodes 30 under the control of a processor 34.

Processor 34 may control therapy delivery circuit 32 to deliverneurostimulation therapy according to a selected program. Specifically,processor 34 may control circuit 32 to deliver electrical pulses withthe amplitudes and widths, and at the rates specified by the program.Processor 34 may also control therapy delivery circuit 32 to deliver thepulses via a selected subset of electrodes 40 with selected polarities,as specified by the program.

Processor 34 may also provide a learning mode of IMD 12 as describedabove. Specifically, processor 34 may receive commands from a user toenter the learning mode, may define an event during the learning mode,and may associate therapy information with the defined event withinmemory 36, as described above. When processor 34 is no longer operatingin the learning mode, processor 34 and/or monitor 42 may detectpreviously defined events, and control therapy delivery circuit 32 todeliver therapy via at least some of electrodes 30 as indicated by theassociated therapy information. Specifically, processor 34 may controltherapy delivery circuit to deliver stimulation pulses with theamplitude, width, and rate indicated by the therapy information, and, insome embodiments, may control therapy delivery circuit to adjust theamplitude, width, and/or rate over time as indicated by the therapyinformation.

IMD 12 also includes a telemetry circuit 38 that allows processor 34 tocommunicate with programming device 20. Processor 34 may receive programselections, commands to enter a learning mode, indications of events,and adjustments to therapy made by a user, e.g., patient 14, usingprogramming device 20 via telemetry circuit 38. In some embodiments, aswill be described in greater detail below, processor 34 communicateswith a clinician programmer to provide diagnostic information stored inmemory 36 to a clinician via telemetry circuit 38. Telemetry circuit 38may correspond to any telemetry circuit known in the implantable medicaldevice arts.

In exemplary embodiments, as described above, IMD 12 includes a sensor40, and processor 34 defines events based on the output of sensor 40.Sensor 40 is a sensor that generates an output based on motion, posture,and/or one or more physiological parameters of patient 14. In exemplaryembodiments, sensor 40 is an accelerometer, such as a piezoresistiveand/or micro-electro-mechanical accelerometer.

In some embodiments, IMD 12 includes an activity/posture monitor 42 thatprocesses the analog output of sensor 40 to provide digital activityand/or posture information to processor 34. For example, where sensor 40comprises a piezoresistive accelerometer, monitor 42 may process the rawsignal provided by sensor 40 to provide activity counts to processor 34.In some embodiments, IMD 12 includes multiple sensors oriented alongvarious axes, or sensor 40 comprises a single multi-axis, e.g.,three-axis, accelerometer. In such embodiments, monitor 42 may processthe signals provided by the one or more sensors 40 to provide velocityof motion information for each direction to processor 34.

In exemplary embodiments, the one or more sensors 40 are housed within ahousing (not shown) of IMD 12. However, the invention is not so limited.In some embodiments, one or more sensors 40 are coupled to monitor 42housed within IMD 12 via additional leads 16 (not shown). Such sensorsmay be located anywhere within patient 14. In some embodiments, IMD 12may include multiple accelerometer sensors 40 located at variouspositions within patient 14 or on the external surface of patient 14,and processor 34 may receive more detailed information about the postureof and activity undertaken by patient 14. For example, accelerometersensors 40 may be located within the torso and at a position within alimb, e.g. a leg, of patient 14.

Sensors 40 may be coupled to a single monitor 42, or IMD 12 may includemultiple monitors 42 coupled to one or more sensors 40. Further, theinvention is not limited to embodiments of IMD 12 that include a monitor42. Rather, sensors 40 may be coupled directly to processor 34, whichmay include an analog-to-digital converter, and perform the functionsattributed to monitor 42. In some embodiments, sensors located externalto patient 12 may communicate wirelessly with processor 34, eitherdirectly or via programming device 20. In some embodiments, one or moresensors 40 may be included as part of or coupled to programming device20.

Moreover, the invention is not limited to embodiments where sensors 40are accelerometers. In some embodiments, one or more sensors 40 may takethe form of, for example, a thermistor, a pressure transducer, orelectrodes to detect thoracic impedance or an electrogram. Such sensors40 may be appropriately positioned within or on an external surface ofpatient 14 to measure a physiological parameter of patient 14, such as askin temperature, an arterial or intracardiac pressure, a respirationrate, a heart rate, or a Q-T interval of patient 14. In suchembodiments, one or more monitor circuits 42 may provide appropriatecircuitry to process the signals generated by such sensors, and toprovide values of the physiological parameter to processor 34.

Processor 34 may include a microprocessor, a controller, a digitalsignal processor (DSP), an application specific integrated circuit(ASIC), a field-programmable gate array (FPGA), discrete logiccircuitry, or the like. Memory 38 may include program instructions that,when executed by processor 34, cause IMD 12 to perform the functionsascribed to IMD 12 herein. Memory 36 may include any volatile,non-volatile, magnetic, optical, or electrical media, such as a randomaccess memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM),electrically-erasable programmable ROM (EEPROM), flash memory, and thelike.

FIG. 3 is a block diagram illustrating an exemplary configuration ofmemory 36 of IMD 12. In some embodiments, memory 36 stores the one ormore programs 50 used by processor 34 (FIG. 2) to control delivery ofstimulation by therapy delivery circuit 32 (FIG. 2). Processor 34 mayreceive the programs from a clinician via a clinician programming deviceand telemetry circuit 38 (FIG. 2), and store the programs in memory 36.In other embodiments, programs 50 are stored within a memory ofprogramming device 20, and provided to processor 34 via telemetrycircuit 38 as needed.

Memory 38 stores events 52 defined by processor 34 during operation inthe learning mode, and learned therapies 54, i.e., the therapyinformation collected during operation in the learning mode. Asdescribed above, an event 52 may be information describing an eventindication received from a user, e.g., patient 14 (FIG. 1), during thelearning mode. For example, an event 52 may indicate a signal receivedvia telemetry circuit 38 when patient presses a key of keypad 24(FIG. 1) that patient 14 has associated with an activity undertaken bypatient 14.

In some embodiments, as described above, processor 34 defines events 52based on the output of one or more sensors 40. Processor 34 may storeone or more sample of the output of sensor 40 and/or monitor 42collected while operating in the learning mode as an event, or one ormore results of an analysis such samples. For example, processor 34 maystore information related to the detection of features within the one ormore samples, such as peaks, zero-crossings, or the like, or the resultsof a Fourier or wavelet analysis of the one dr more samples as a definedevent 52.

As described above, learned therapies 54 comprises informationdescribing values of stimulation parameters and/or informationdescribing one or more changes to parameters made by a user whileprocessor 34 is operating in the learning mode. In exemplaryembodiments, a learned therapy 54 comprises information describinginitial parameter values and changes to be made to some or all of theparameter values over a period of time. In such embodiments, the learnedtherapy may include time values associated with parameter values, sothat processor 34 may direct changes to parameter values at appropriatetimes. Memory 36 maintains associations between events 52 andcorresponding learned therapies 54.

Processor 34 may also collect diagnostic information 56 and storediagnostic information 56 within memory 36 for future retrieval by aclinician. Diagnostic information 56 may, for example, include selectedrecordings of the output of sensor 40 and/or of therapy changes made bypatient 14. In exemplary embodiments, diagnostic information 56 includesinformation identifying the time at which defined events occurred,either during operation in a learning mode or as subsequently detectedby processor 34. Diagnostic information 56 may include other informationor events indicated by patient 14 outside of learning mode usingprogramming device 20, such as changes in symptoms, taking medication,or other activities undertaken by patient 14 for which patient 14 doesnot wish IMD 12 to learn a therapy. A clinician programming device (notshown in FIGS.) may present diagnostic information 56 to a clinician ina variety of forms, such as timing diagrams, or a graph resulting fromstatistical analysis of diagnostic information 56, e.g., a bar graph.

FIG. 4 is a block diagram further illustrating programming device 20. Asindicated above, in exemplary embodiments programming device 20 takesthe form of a patient programming device used by patient 14 to controldelivery of therapy by IMD 12. Patient 14 may interact with a processor60 via a user interface 62 in order to control delivery ofneurostimulation therapy, direct IMD 12 to enter a learning mode,indicate events and make therapy changes, as described herein. Userinterface 62 may include display 22 and keypad 24, and may also includea touch screen or peripheral pointing devices as described above.Processor 60 may also provide a graphical user interface (GUI) tofacilitate interaction with patient 14. Processor 60 may include amicroprocessor, a controller, a DSP, an ASIC, an FPGA, discrete logiccircuitry, or the like.

Programming device 20 also includes a telemetry circuit 64 that allowsprocessor 60 to communicate with IMD 12. In exemplary embodiments,processor 60 communicates commands, indications, and therapy changesmade by patient 14 via user interface 62 to IMD 12 via telemetry circuit64. Telemetry circuit 64 may correspond to any telemetry circuit knownin the implantable medical device arts.

Programming device also includes a memory 66. In some embodiments,memory 66, rather than memory 36 of IMD 12, may store programs 50 thatare available to be selected by patient 14 for delivery ofneurostimulation therapy. Memory 66 may also include programinstructions that, when executed by processor 60, cause programmingdevice 20 to perform the functions ascribed to programming device 20herein. Memory 66 may include any volatile, non-volatile, fixed,removable, magnetic, optical, or electrical media, such as a RAM, ROM,CD-ROM, hard disk, removable magnetic disk, memory cards or sticks,NVRAM, EEPROM, flash memory, and the like.

FIG. 5 is a flow diagram illustrating an exemplary operation of IMD 12according to a learning mode. Specifically, FIG. 5 illustrates anexemplary mode of IMD 12 to learn a therapy for an event that isindicated by patient 14. Processor 34 enters the learning mode inresponse to receiving a command from patient 14 (70). Patient 14 maydirect processor 34 to enter the learning mode by pressing a key ofkeypad 24 of programming device 20.

When operating in the learning mode, processor 34 defines an event 52 byreceiving an indication from patient 14 (72). Patient 14 may indicatethe event by, for example, pressing a key of keypad 24 that patient willthereafter use to identify the event to processor 34. The event 52 maybe an activity and/or posture to be undertaken by patient 14, and thekey may be used by patient 14 in the future to indicate to processor 34that patient 14 is about to undertake the activity. Processor 34 maystore information identifying the signal received by via telemetrycircuit 38 when patient presses the key as the event 52 within memory36.

Processor 34 then records therapy information, e.g., a learned therapy54, while operating in the learning mode (74). As described above, thelearned therapy 54 may be stimulation parameter values and/or one ormore changes made to stimulation parameters by patient 14 over a periodof time during operation within the learning mode. Processor 34 maystore therapy information as a learned therapy at any time afterreceiving the command to enter the learning mode, e.g., before or afterreceiving an indication of the event from patient 14. Processor 34stores the learned therapy 54 within memory 36, and associates thelearned therapy 54 with the defined event 52 within memory 36 (76).

In exemplary embodiments, patient 14 adjusts stimulation parameters overa period of time after directing IMD 12 to enter the learning mode,e.g., during the event. For example, patient 14 may direct IMD 12 toenter the learning mode, so that IMD 12 learns appropriate adjustmentsto therapy to provide while patient 14 is running, and may adjuststimulation parameters while running to maintain effective andcomfortable neurostimulation therapy. IMD 12 may store the stimulationparameters and/or changes to the stimulation parameters and associatetimes with the parameters or changes, so that stimulation according tothe parameters and changes to the stimulation may be provided atappropriate times during a subsequent occurrence of patient 14 running.

In other embodiments, rather than IMD 12 recording therapy informationover time, patient 14 may use programming device 20 to enter a learnedtherapy 54 that includes time as a parameter. For example, patient 14may create a learned therapy 54 for the “running” event that includesincreases to pulse amplitude and width at particular time after theevent is detected by IMD 12, and/or after N minutes that the eventcontinues to be detected by IMD 12.

FIG. 6 is a flow diagram illustrating another exemplary operation IMD 12according to a learning mode. Specifically, FIG. 6 illustrates anexemplary mode of IMD 12 to learn a therapy for an event that that isdefined by IMD 12 based on the output of a sensor 40. Processor 34enters the learning mode in response to receiving a command from patient14 (80).

While operating in the learning mode, processor 34 records at least oneof the output of sensor 40 or the information provided by monitorcircuit 42 based on the sensor output (82). Processor 34 may record thesensor output or information over any length of time, may recordmultiple samples, and may make the recording or recordings at any timeafter entering the learning mode. Processor 34 may store therecording(s), or the result of an analysis, e.g. feature, Fourier, orwavelet, or the recording(s) in memory 36 as an event 52. Processor 34records therapy information as a learned therapy 54 during operation inthe learning mode (84), and associates the learned therapy 54 with thedefined event 52 (86), as described above with reference to FIG. 5.

FIG. 7 is a flow diagram illustrating an exemplary operation of IMD 12to provide automatic therapy adjustments according to the invention.Processor 34 monitors signals received from programming device 20 viatelemetry circuit 38, and output of sensor 40 and/or monitor circuit 42,to detect previously defined events 52 (90). To monitor the sensoroutput, processor 34 compares the current sensor output to the event.52. For example, processor 34 can compare the current sensor output tothe sample sensor output recorded during operation in the learning mode,or the result of a signal analysis of the current sensor output to theresult of a signal analysis of the sample sensor output recorded duringoperation in the learning mode. Processor 34 may use any of a variety ofknown pattern matching techniques or algorithms, such as fuzzy logic orneural network techniques or algorithms, to subsequently detect thepreviously defined events 52.

If processor 34 detects a previously defined event 52 (92), processor 34controls therapy delivery circuit 32 to deliver therapy according to thelearned therapy 54 associated with the detected event 52 in memory 36(94). Processor 34 may control circuit 32 to deliver therapy accordingto parameter values of the learned therapy 54. Processor 34 may alsocontrol circuit 32 to change the parameter values over time according tothe learned therapy 54.

If processor 34 detects that patient 14 has made changes to stimulationparameters during provision of therapy according to the learned therapy54 (96), processor 34 may query patient 14 via programming device 20 asto whether the changes should be saved as a modification to the learnedtherapy 54 (98). If patient 14 wishes to save the changes, processor 34modifies the learned therapy 54 according to the changes (100).

As described above, an event 52 may be an activity or posture undertakenby patient 14. For example, an event 52 may be patient 14 running, andthe learned therapy 54 may include changes to stimulation parametersoccurring at associated times during the “running” event such thateffective and comfortable therapy is maintained. Other activities andpostures that may effect the symptoms experienced by patient 14, or theeffectiveness and side effects of the stimulation may include golfing,gardening, driving a car, sitting in a chair, twisting, or bending over.In some cases the duration of a particular activity or posture mayaffect the symptoms experienced by patient 14, or the effectiveness andside effects of the stimulation. In such cases an event 52 may bedefined as occurring after patient 14 maintains an activity or posturefor a defined duration.

In some cases, an activity or posture undertaken by patient 14 isresults in an uncomfortable increase in the intensity of the stimulationdelivered by IMD 12. This phenomenon is referred to as a “jolt.”.Activities and postures that may lead to “jolts” include sitting in aseat, twisting, bending over, rapid posture changes, or other likepostures or transitions between postures. Patient 14 may use thelearning mode provided by IMD 12 as described herein to cause IMD 12 todefine events 52 associated with the activities or postures that lead to“jolts,” and associate such “jolt” events with therapy information 54that causes IMD 12 to suspend or reduce the intensity of stimulationupon subsequent detection of the “jolt” events. Consequently,embodiments of IMD 12 may advantageously provide efficacious therapyduring certain defined events 52, and avoid providing uncomfortabletherapy during other defined events 52.

FIG. 8 is a timing diagram illustrating display of diagnosticinformation 56 including learned events 52 according to the invention.As described above, in some embodiments processor 34 collects diagnosticinformation for review by a clinician that may include defined events,events indicated by patient 14 outside of the learning mode, the outputof sensor 40 and/or monitor circuit 42, stimulation parameter valuesand/or changes made thereto over time, or the like. Diagnosticinformation 56 may be retrieved from IMD 12 by a clinician programmerand presented to a clinician in a variety of forms, such as theillustrated timing diagram, or various graphs, such as bar graphs,illustrating the result of a statistical analysis of diagnosticinformation 56. A clinician may use diagnostic data 56 to, for example,objectively assess patient activity, therapy effectiveness, patientcompliance, or the like.

In the illustrated timing diagram, a curve 110 representing the activitylevel of patient 14, e.g., the output of one or both of sensor 40 andmonitor 42, over time is displayed. Markers 112A-E are used to indicatethe occurrence of events, which may be defined events 52. A second curve114 illustrates the symptom, e.g., pain, intensity indicated by patient14 over time. Curve 114 may be estimated based on intensity values116A-F periodically entered by patient 14 using programming device 20.

Various embodiments of the invention have been described. However, oneskilled in the art will appreciate that various modification may be madeto the described embodiments without departing from the scope of theinvention. For example, the invention is not limited to medical devicesthat deliver neurostimulation therapy or to implantable medical devices.Rather, systems that facilitate automatic therapy adjustment accordingto the invention may include one or more implantable or external medicaldevices, of any type, that deliver therapy to a patient. For example, insome embodiments, an implantable or external pump that delivers atherapeutic agent to a patient can provide automatic therapy adjustmentaccording to the invention

In some embodiments, a medical device that does not itself delivertherapy, such as a programming device, provides automatic therapyadjustment according to the invention. In such embodiments, theprogramming device may receive a command to enter a learning mode, anindication of an event, and therapy changes from the patient via akeypad, for example. The programming device may include a memory tostore defined events and associated therapy information. When the user,e.g., the patient, again indicates occurrence of the event to theprogramming device via the keypad, the programming device controls atherapy delivery device to deliver therapy according to therapyinformation associated with the defined event.

The invention is not limited to embodiments wherein a programming deviceis a patient programmer. For example, in some embodiments, a programmingdevice may be a clinician programmer used by a clinician to, forexample, create the programs that control the delivery of therapy by atherapy delivery device. The clinician may use the clinician programmer,during a programming session for example, to cause the clinicianprogrammer or the therapy delivery device to learn therapies for definedevents as described herein

In other embodiments, a system that facilitates automatic therapyadjustment does not include a programming device at all. Where a systemincludes an external medical device that provides therapy to a patient,for example, a user may interact with a user interface provided by themedical device and a programming device may therefore be unnecessary. Auser may also interact with an implanted medical device using a magneticactivator, or by tapping over the implanted medical device, which may bedetected via an accelerometer, as is known in the art. These and otherembodiments are within the scope of the following claims.

1. A method comprising: monitoring an output of a sensor, the output ofthe sensor reflecting a physiological parameter of a patient; initiallydefining an event based on the monitoring of the sensor output, whereininitially defining the event comprises storing an indication of themonitored sensor output within a memory as the defined event; monitoringtherapy delivered by a medical device while the output of the sensor wasmonitored during the event to initially define the event; generatingtherapy information based on the monitoring of the therapy while theoutput of the sensor was monitored during the event to initially definethe event; associating the therapy information with the defined eventwithin the memory; subsequently detecting the defined event bymonitoring the output of the sensor and comparing the sensor output tothe defined event; and automatically providing therapy to the patientvia the medical device according to the therapy information associatedwith the defined event in response to the detection.
 2. The method ofclaim 1, wherein the sensor comprises an accelerometer.
 3. The method ofclaim 1, wherein the sensor output reflects at least one of motion orposture of the patient.
 4. The method of claim 1, wherein defining theevent based on the monitoring of the sensor output comprises recordingthe sensor output over a period of time.
 5. The method of claim 1,wherein generating therapy information comprises recording a value of atherapy parameter that controls delivery of therapy by the medicaldevice.
 6. The method of claim 5, wherein recording the value of thetherapy parameter comprises recording a change to the therapy parametermade by the user.
 7. The method of claim 6, wherein recording a changeto the therapy parameter comprises recording changes to the therapyparameter made by the user over a period of time.
 8. The method of claim7, wherein providing therapy to a patient according to the therapyinformation comprises changing the therapy parameter at a timesubsequent to detection of the event according to the recorded changesto the therapy parameter.
 9. The method of claim 6, wherein the medicaldevice includes an implantable medical device, and recording the changeto the therapy parameter comprises receiving the change to the therapyparameter made by the user via a programming device.
 10. The method ofclaim 9, wherein the implantable medical device includes an implantableneurostimulator, and receiving the change to the therapy parametercomprises receiving a change to at least one of a pulse amplitude, apulse width, or a pulse rate of stimulation energy delivered by theneurostimulator.
 11. The method of claim 5, wherein recording the valueof the parameter comprises receiving the value of the parameter and atime from a user, and providing therapy to a patient according to thetherapy information comprises changing delivery of therapy at a timesubsequent to detection of the event according to the value and timereceived from the user.
 12. The method of claim 1, wherein providingtherapy to a patient according to the therapy information comprisessuspending delivery of therapy.
 13. The method of claim 1, furthercomprising presenting the defined event to a clinician as diagnosticdata.
 14. The method of claim 13, wherein presenting the defined eventto the clinician comprises presenting the defined event as a markerwithin a timing diagram.
 15. The method of claim 1, further comprisingreceiving a command from a user to enter a learning mode in order todefine the event and record and associate therapy information with thedefined event, wherein the user is one of a clinician or the patient.16. The method of claim 1, further comprising receiving a command from auser to enter a learning mode in order to define the event and associatethe therapy information with the defined event.
 17. The method of claim1, wherein providing therapy comprises managing pain in the patient. 18.The method of claim 1, further comprising performing each of thefollowing by the medical device: monitoring the output of the sensor;initially defining the event based on the monitoring of the sensoroutput, wherein initially defining the event comprises storing anindication of the monitored sensor output within a memory as the definedevent; monitoring therapy delivered by the medical device while theoutput of the sensor was monitored during the event to initially definethe event; generating therapy information based on the monitoring of thetherapy while the output of the sensor was monitored during the event toinitially define the event; associating the therapy information with thedefined event within the memory; subsequently detecting the definedevent; and providing therapy to the patient via the medical deviceaccording to the therapy information in response to the detection.
 19. Amedical device comprising: a sensor that generates an output as afunction of a physiological parameter of a patient; a therapy deliverymodule that delivers therapy to a patient; a memory; and a processorthat: monitors the output of the sensor; initially defines an eventbased on the monitoring of the sensor output by storing an indication ofthe monitored sensor output within the memory as the defined event;monitors therapy delivered by the therapy delivery module device whilethe output of the sensor was monitored during the event to initiallydefine the event; generates therapy information based on the monitoringof the therapy while the output of the sensor was monitored during theevent to initially define the event; associates the therapy informationwith the defined event within the memory; subsequently detects thedefined event by monitoring the output of the sensor and comparing thesensor output to the defined event; and automatically controls deliveryof therapy to the patient by the therapy delivery module according tothe therapy information associated with the defined event in response tothe detection.
 20. The medical device of claim 19, wherein the sensoroutput reflects at least one of motion or posture of the patient. 21.The medical device of claim 19, wherein the sensor comprises anaccelerometer.
 22. The medical device of claim 21, wherein theaccelerometer comprises a multi-axis accelerometer.
 23. The medicaldevice of claim 19, wherein the processor defines the event by storing arecording of the sensor output over a period of time within the memory.24. The medical device of claim 19, wherein the therapy informationcomprises a value of a parameter that controls delivery of therapy tothe patient, and the processor associates the value and the definedevent within the memory.
 25. The medical device of claim 24, wherein thetherapy information reflects a change to the parameter made by a user,and the processor records the change and associates the recorded changewith the defined event within the memory.
 26. The medical device ofclaim 25, wherein the therapy information reflects changes to theparameter made by the user over a period of time, and the processorrecords the changes over the period of time and associates the recordedchanges with the defined event within the memory.
 27. The medical deviceof claim 26, wherein the processor changes the therapy parameter at atime subsequent to detection of the event according to the recordedchanges to the therapy parameter.
 28. The medical device of claim 24,wherein the processor receives the value of the parameter and a timefrom a user via a user interface, and changes delivery of therapy at atime subsequent to detection of the event according to the value andtime received from the user.
 29. The medical device of claim 19, whereinthe processor stores the defined event within the memory as diagnosticdata for presentation to a clinician.
 30. The medical device of claim29, further comprising a user interface, wherein the processor presentsthe defined event to the clinician as a marker within a timing diagramvia the user interface.
 31. The medical device of claim 19, wherein theprocessor suspends delivery of therapy in response to the detection ofthe previously defined event.
 32. The medical device of claim 19,wherein the medical device comprises an implantable neurostimulator. 33.The medical device of claim 19, wherein the medical device comprises aprogramming device that communicates with an implantable medical device.34. The medical device of claim 19, wherein the processor receives acommand from a user to enter a learning mode in order to define theevent and record and associate therapy information with the definedevent, and wherein the user comprises one of a clinician or the patient.35. The medical device of claim 19, further comprising a user interface,wherein the processor receives a command to enter a learning mode from auser via the user interface in order to define the event and associatethe therapy information with the defined event.
 36. The medical deviceof claim 19, further comprising a pulse generator that is controlled bythe processor to deliver pain management therapy to the patient.
 37. Acomputer-readable medium comprising instructions that cause aprogrammable processor to: monitor an output of a sensor, the output ofthe sensor reflecting a physiological parameter of a patient; initiallydefine an event based on the monitoring of the sensor output, whereinthe instructions that cause the programmable processor to initiallydefine the event comprise instructions that cause the programmableprocessor to store an indication of the monitored sensor output within amemory as the defined event; monitor therapy delivered by a medicaldevice while the output of the sensor was monitored during the event toinitially define the event; generate therapy information based on themonitoring of the therapy while the output of the sensor was monitoredduring the event to initially define the event; associate the therapyinformation with the defined event within the memory; subsequentlydetect the defined event by monitoring the output of the sensor andcomparing the sensor output to the defined event; and automaticallycontrol delivery of therapy to the patient via the medical deviceaccording to the therapy information associated with the defined eventin response to the detection.
 38. The computer-readable medium of claim37, wherein the instructions that cause the programmable processor todefine the event based on the monitoring of the sensor output compriseinstructions that cause the programmable processor to record the sensoroutput over a period of time.
 39. The computer-readable medium of claim37, wherein the instructions that cause the programmable processor togenerate therapy information comprise instructions that cause theprocessor to record a value of a parameter that controls delivery oftherapy by the therapy device.
 40. The computer-readable medium of claim39, wherein the instructions that cause the programmable processor torecord a value of a therapy parameter comprises instructions that causethe programmable processor to record a change to the parameter made bythe user.
 41. The computer-readable medium of claim 40, wherein theinstructions that cause the programmable processor to record a change tothe parameter comprises instructions that cause the programmableprocessor to record changes to the therapy parameter made by the userover a period of time.
 42. The computer-readable medium of claim 41,wherein the instructions that cause the programmable processor toprovide therapy to a patient according to the therapy informationcomprise instructions that cause the programmable processor to changethe therapy parameter at a time subsequent to detection of the eventaccording to the recorded changes to the therapy parameter.
 43. Thecomputer-readable medium of claim 39, wherein the instructions thatcause the programmable processor to record a value of a parametercomprise instructions that cause the programmable processor to receivethe value of the parameter and a time from the user, and theinstructions that cause the programmable processor to provide therapy toa patient according to the therapy information comprise instructionsthat cause the programmable processor to change delivery of therapy at atime subsequent to detection of the event according to the value andtime received from the user.
 44. The computer-readable medium of claim37, wherein the instructions cause the processor to receive a commandfrom a user to enter a learning mode in order to define the event andrecord and associate therapy information with the defined event, andwherein the user is one of a clinician or the patient.
 45. The computerreadable medium of claim 37, wherein the instructions cause theprocessor to receive a command from a user to enter a learning mode inorder to define the event and associate the therapy information with thedefined event.
 46. The computer readable medium of claim 37, wherein theinstructions that cause the processor to provide therapy compriseinstructions that cause the processor to control a pulse generator todeliver pain management therapy to the patient.
 47. A method comprising:monitoring an output of a sensor, the output of the sensor reflecting aposture of a patient; initially defining a posture event based on themonitoring of the sensor output, wherein initially defining the postureevent comprises storing an indication of the monitored sensor outputwithin a memory as the defined posture event; monitoring therapydelivered by a medical device while the output of the sensor wasmonitored during the event to initially define the event; generatingtherapy information based on the monitoring of the therapy while theoutput of the sensor was monitored during the event to initially definethe event; associating the therapy information with the defined eventwithin the memory; subsequently detecting the defined posture event bymonitoring the output of the sensor and comparing the sensor output tothe defined event; and providing therapy to the patient via the medicaldevice according to the therapy information in response to thedetection.